//获取文件夹列表
import request from '@/utils/request'

export function getFolderTree() {
    return request({
        url: '/api/folder/tree',
        method: 'get',
    })
}

export function getFolderTrees() {
    return request({
        url: '/api/folder/trees',
        method: 'get',
    })
}

// 删除文件夹
export function deleteFolder(folderId) {
    return request({
        url: '/api/folder/' + folderId,
        method: 'delete'
    })
}

// 文件夹重命名
export function renameFolder(data) {
    return request({
        url: `/api/folder/${data.folderId}/renameFolder`,
        method: 'put',
        data: { newName: data.newName }
    })
}